package zjut.cocouml.figure;

import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.LineBorder;
import org.eclipse.draw2d.ToolbarLayout;

public class LabelName extends Figure {
	
	private Label name = new Label();
	
	public LabelName() {
		ToolbarLayout layout = new ToolbarLayout();
		this.setLayoutManager(layout);
		this.add(name,ToolbarLayout.ALIGN_CENTER);
		System.out.println("--------------add labelName LabelName------------------");
		this.setConstraint(name,ToolbarLayout.ALIGN_CENTER);
		this.setForegroundColor(ColorConstants.black);
		this.setOpaque(true);
	}
	
	public void setName(String name) {
		this.name.setText(name);
	}
	public String getName() {
		return this.name.getText();
	}
	
}	
